package com.atguigu.gulimall.order.feign;


import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.vo.MemberAddressTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("gulimall-member")
public interface MemberFeignService {

    /**
     * 查询当前用户的所有收货地址
     * @param memberId
     * @return
     */
    @RequestMapping("/member/memberreceiveaddress/{memberId}/address")
    public List<MemberAddressTo> getAddress(@RequestParam("memberId") Long memberId);


    @PostMapping("/member/member/updateMemberMoney/{id}/{pay}")
    public R updateMemberMoney(@PathVariable("pay") String pay, @PathVariable("id") Long id);

}
